package com.intellagric.agriecom.module.agriecom_produce_category;

import com.intellagric.common.pojo.LayuiDataGridResult;
import com.intellagric.common.pojo.ResponseMessage;
import com.intellagric.pojo.AgriecomProduceCategory;

import java.util.List;

public interface AgriecomProduceCategoryService {
    //增加ProduceCategory
    ResponseMessage addProduceCategory(AgriecomProduceCategory produceCategory);
    //根据id删除ProduceCategory
    ResponseMessage deleteProduceCategory(String id);
    //根据id编辑ProduceCategory
    ResponseMessage editProduceCategory(AgriecomProduceCategory produceCategory);
    //根据id查询ProduceCategory
    AgriecomProduceCategory getProduceCategoryById(String id);
    //查询全部的ProduceCategory
    LayuiDataGridResult getProduceCategoryList();
    //分页查询全部的ProduceCategory
    LayuiDataGridResult getProduceCategoryList(int page, int rows);
    //查询菜单数据信息，生成树形菜单
    LayuiDataGridResult getMenu();
    //异步查询菜单，通过父id查询
    LayuiDataGridResult getCategoryByParentId(String parentId);
    //根据id批量删除
    ResponseMessage batchDeleteProduceCategory(String[] ids);
    //获取字类分类
    List<AgriecomProduceCategory> getCategoryChildren(String parentCategroyId);

    AgriecomProduceCategory getAncestorNode(String categoryId,int level );
}
